-
Notifications
You must be signed in to change notification settings - Fork 246
Use IRParser instead of BitcodeReader #3399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The IRParser offers a higher level API, that allows us to also read bitcode assembly, and not only compiled bitcode. This allows us to skip the `llvm-as %s -o %t.bc` step in several tests. I only updated 3 tests to show the difference; but we have more than 500 occurences of `llvm-as %s -o` in the tests: > $/repo/test$ grep -r "llvm-as %s -o" | cut -d':' -f1 | sort -u | wc -l > 506
MrSidims
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sound legit, thank you!
|
There is a strange fail in |
I'm clueless since it seems to work on my system (with debug and asan enabled). I'll try to rerun the CI jobs re-check. |
|
@jmmartinez I believe it's unrelated with your PR as I also see the same failure in #3398 . Taking a look |
intel-gather-scatter.ll should be due to community IR change |
This is a follow-up of #3399 . After #3399, we do not need to run `llvm-as`, we can directly consume the textual llvm-ir representation. This patch profits from this to clean this pattern in the test: ```bash RUN: llvm-as %s -o %t.bc RUN: llvm-spirv %t.bc ... ``` And replaces it by ```bash RUN: llvm-spirv %s ... ```
This is a follow-up of KhronosGroup/SPIRV-LLVM-Translator#3399 . After KhronosGroup/SPIRV-LLVM-Translator#3399, we do not need to run `llvm-as`, we can directly consume the textual llvm-ir representation. This patch profits from this to clean this pattern in the test: ```bash RUN: llvm-as %s -o %t.bc RUN: llvm-spirv %t.bc ... ``` And replaces it by ```bash RUN: llvm-spirv %s ... ``` Original commit: KhronosGroup/SPIRV-LLVM-Translator@57c254d32ea287a
The IRParser offers a higher level API, that allows us to also read bitcode assembly, and not only compiled bitcode.
This allows us to skip the
llvm-as %s -o %t.bcstep in several tests.I've only updated 3 tests to show the difference; but we have more than 500 occurrences of
llvm-as %s -oin the tests:As a bonus, the function
llvm::getLazyIRFileModule(https://llvm.org/doxygen/namespacellvm.html#aac226baa3ffd0f255a8d2b6d978b81b2) also callsMemoryBuffer::getFileOrSTDIN.